using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmPurchaseOrderPenalty")]
    public class PurchaseOrderPenalty
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "IcmPoPenId", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public int PoPenId { get; set; }

		[DataMember, Display(Name = "IcmPoPenName", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public string Name { get; set; }

		[DataMember, Display(Name = "IcmPoPenDescr", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public string Descr { get; set; }

		[DataMember, Display(Name = "IcmPoPenRate", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<double> PenaltyRate { get; set; }

        [ForeignKey("PenaltyRateType")]
		[DataMember, Display(Name = "IcmPenRateTypeId", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<int> RateTypeId { get; set; }

        //[ForeignKey("SysPenaltyCount")]
        //[DataMember, Display(Name = "IcmPenCountId", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        //public Nullable<int> IcmPenCountId { get; set; }

		[DataMember, Display(Name = "IcmPoPenLeast", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<double> PenaltyLeast { get; set; }

        [ForeignKey("PurchaseOrder")]
		[DataMember, Display(Name = "IcmPoId", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<int> PoId { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PurchaseOrderPenaltyResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }
    

		[DataMember]
        public virtual PurchaseOrder PurchaseOrder { get; set; }

        //[DataMember]
        //public virtual SysPenaltyCount SysPenaltyCount { get; set; }

		[DataMember]
        public virtual IcmMasLookUp PenaltyRateType { get; set; }
        
    }
}